# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gnome-terminal
pkgver=3.48.2
pkgrel=1
pkgdesc="GNOME terminal emulator application"
url="https://wiki.gnome.org/Apps/Terminal"
# gnome-shell
arch="all !armhf !s390x !riscv64"
license="GPL-2.0-or-later AND GFDL-1.3-only"
depends="
	dbus
	desktop-file-utils
	gnome-shell-schemas
	gsettings-desktop-schemas
	ncurses-terminfo-base
	"
makedepends="
	dconf-dev
	glib-dev
	gnome-shell
	gsettings-desktop-schemas-dev
	itstool
	meson
	nautilus-dev
	pcre2-dev
	vte3-dev
	"
subpackages="$pkgname-doc $pkgname-lang"
source="https://gitlab.gnome.org/GNOME/gnome-terminal/-/archive/$pkgver/gnome-terminal-$pkgver.tar.gz
	fix-W_EXITCODE.patch
	"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	rm -rf "$pkgdir"/usr/lib/systemd
}

sha512sums="
245b74a5bb3907ca44951d6e733b5066dc139313ad97f593eb67be3d5cc2e630b32372596dcaefb26c67200af7f033c0bf40ccde44fa38463df0ff2cdea14c83  gnome-terminal-3.48.2.tar.gz
3bbc0e9dbbbfd4a3263b5d195a78df9cc70d13ae02d3a2981886001e79d92c2bfe4962954efba8fbab69f23e1778d5fbe3436f494b70e196ecedb02bf9d95400  fix-W_EXITCODE.patch
"
